<div class="page-header position-relative">
	<h1>
		Cập Nhật Slide
	</h1>
</div>
<div class="row-fluid">
	<div class="span12">
		<!--PAGE CONTENT BEGINS-->
		<?php
		$form = $this->beginWidget('CActiveForm', array(
                'id' => 'slide-form',
//            'enableAjaxValidation' => false,
                'enableClientValidation' => true,
                'htmlOptions' => array(
                    'class' => 'form-horizontal',
                    'enctype' => 'multipart/form-data',
                    ),
                ));
		?>

			<div class="control-group">
				<?php echo $form->label($model,'Tên Slide',array('class' => 'control-label')); ?>
				<div class="controls">
					<?php echo $form->textField($model, 'SlideName', array('size' => 60, 'maxlength' => 255,'class'=>'span5','placeholder' => 'Tên Slide')); ?>
                	<span class="help-inline"><?php echo $form->error($model, 'SlideName'); ?></span>
				</div>
			</div>

            <div class="control-group">
                    <?php echo $form->labelex($model, 'Hình Ảnh', array('class' => 'control-label')); ?>
                    <div class="controls">
                        <?php echo $form->fileField($model, 'SlidePhotoName', array('class' => 'id-input-file-1 span5')); ?>
                        <span class="help-inline" style="float:left;margin-left:390px;"><?php echo $form->error($model, 'SlidePhotoName'); ?></span>
                    </div>
            </div>

            <div class="control-group">
                <div class="controls">
                    <img src="<?php echo Yii::app()->baseUrl;?>/timthumb.php?src=/images/slide/<?php echo $model['SlidePhotoName'];?>&amp;h=150&amp;w=150">
                </div>
            </div>

			<div class="control-group">
				<?php echo $form->labelex($content, 'Mô Tả Ngắn', array('class' => 'control-label')); ?>
				<!-- <label class="control-label">Mô Tả Ngắn</label> -->
				<div class="controls">
					<?php echo $form->textField($content, 'Short_Descriptions', array('size' => 60, 'maxlength' => 255,'class'=>'span5','placeholder' => 'Mô Tả Ngắn')); ?>
                	<span class="help-inline"><?php echo $form->error($content, 'Short_Descriptions'); ?></span>
				</div>
			</div>


			<div class="control-group">
				<?php echo $form->label($model,'Trạng Thái',array('class' => 'control-label')); ?>

				<div class="controls">
					<?php echo $form->dropDownlist($model, 'Status', array('0' => 'Không kích hoạt','1'=>'Kích hoạt')); ?>
                	<span class="help-inline"><?php echo $form->error($model, 'Status'); ?></span>
				</div>
			</div>

			<div class="control-group">
				<label class="control-label">Chi Tiết</label>
			</div>

			<?php
                $this->widget('ext.editMe.ExtEditMe', array(
                    'model' => $content,
                    //'name' => 'description'
                    'height' => '250px',
                    'width' => '100%',
                    'attribute' => 'Descriptions',
                    'toolbar' => Yii::app()->params['ckeditor'],
                    'filebrowserBrowseUrl' => Yii::app()->baseUrl . '/ckfinder/ckfinder.html',
                    'filebrowserImageBrowseUrl' => Yii::app()->baseUrl . '/ckfinder/ckfinder.html?type=Images',
                    'filebrowserFlashBrowseUrl' => Yii::app()->baseUrl . '/ckfinder/ckfinder.html?type=Flash',
                    'filebrowserUploadUrl' => Yii::app()->baseUrl . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
                    'filebrowserImageUploadUrl' => Yii::app()->baseUrl . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
                    'filebrowserFlashUploadUrl' => Yii::app()->baseUrl . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash',
                ));
                ?>
			

			<div class="form-actions">
				<button class="btn btn-info" type="submit">
					<i class="icon-ok bigger-110"></i>
					Submit
				</button>

				&nbsp; &nbsp; &nbsp;
				<button class="btn" type="reset">
					<i class="icon-undo bigger-110"></i>
					Reset
				</button>
			</div>

		<?php $this->endWidget(); ?>
		</div>
		</div>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/backend/tag/bootstrap-tagsinput.js"></script>
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/backend/tag/bootstrap-tagsinput.css">
<style>
    .control-group span.required,.errorMessage {color:red;}
    .bootstrap-tagsinput {width:365px;margin-top:5px;}
    .ace-file-input {width: 380px;height: auto;}

</style>

<?php echo $this->renderPartial('_popup', array('model'=>$model)); ?>
		